<header>
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
           <span class="icon-bar"></span> <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#" [routerLink]="['/rector']"><img src="../../assets/img/logo.png" alt="" width="100px"></a>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li  *ngFor="let menu of menus" [class.active]="currentId == menu.id" [class.dropdown]="menu.type == 'dropdown'">
            <a *ngIf="menu.type != 'dropdown'" href="javascript:;" (click)="nav(menu)">{{menu.name}}</a>
            <a *ngIf="menu.type == 'dropdown'" href="javascript:;" (click)="nav(menu)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
              {{menu.name}}<span class="caret"></span></a>
            <ul class="dropdown-menu" *ngIf="menu.type == 'dropdown'">
              <li *ngFor="let child of menu.child">
                <a href="javascript:;"  [routerLink]="[child.url]">{{child.name}}</a>
              </li>
            </ul>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
              <img src="../../assets/img/user.png" class="user-image">{{userName}} <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li>
                <a href="#" [routerLink]="['./updatePass']">修改密码</a>
              </li>
            </ul>
          </li>
        </ul>
      </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
  </nav>
</header>
